<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilnvm: xnvm_bbram.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilnvm
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xnvm__bbram_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xnvm_bbram.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains NVM library BBRAM functions. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date        Changes
</p>
<hr/>
<p>
1.0   mmd  04/01/2019 Initial release
2.0   kal  11/14/2019 Added error check when BBRAM keylen is not 128 or 256.
2.1     am   08/19/2020 Resolved MISRA C violations.
      kal  09/03/2020 Fixed Security CoE review comments
      am   10/13/2020 Resolved MISRA C violations
2.3   am   11/23/2020 Resolved MISRA C violation Rule 10.6
        kal  12/23/2020 Disable BBRAM programming in error case also
      kal  01/27/2021   Zeroize BBRAM in case of CRC mismatch
                Zeroize BBRAM User Data in case of write failure
2.4   kal  07/13/2021 Fixed doxygen warnings
      kal  08/03/2021 Removed clearing BBRAM UsrData in case for write failure
3.0   kal  08/01/2022 Added redundancy to XNvm_BbramEnablePgmMode function
      dc   08/29/2022 Changed u8 to u32 type
3.1   skg  10/23/2022 Added In body comments for APIs
3.4   pre  09/11/2024 Removed zeroization before writing key
      ng   09/20/2024 Fixed doxygen grouping
3.5   pre  11/21/2024 Removed zeroization before writing key
3.5   hj   26/03/2025 Return explicit error code on General Purpose BBRAM8 write request in SB
      har  04/10/2025 Modified to read user data from XNVM_BBRAM_8_MEM_REG for versal_2ve_2vm</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga6ebc086461092546789c62ddbd362948"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__bbram__server__apis.html#ga6ebc086461092546789c62ddbd362948">REVERSE_POLYNOMIAL</a>&#160;&#160;&#160;(0x82F63B78U)</td></tr>
<tr class="memdesc:ga6ebc086461092546789c62ddbd362948"><td class="mdescLeft">&#160;</td><td class="mdescRight">Polynomial used for CRC calculation.  <a href="group__xnvm__bbram__server__apis.html#ga6ebc086461092546789c62ddbd362948">More...</a><br/></td></tr>
<tr class="separator:ga6ebc086461092546789c62ddbd362948"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3d264db9b87c4fe29a755a02f0bad72f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__bbram__server__apis.html#ga3d264db9b87c4fe29a755a02f0bad72f">XNvm_BbramLockUsrDataWrite</a> (void)</td></tr>
<tr class="memdesc:ga3d264db9b87c4fe29a755a02f0bad72f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function locks the user data written in BBRAM_8 that is making user data written in BBRAM as read only.  <a href="group__xnvm__bbram__server__apis.html#ga3d264db9b87c4fe29a755a02f0bad72f">More...</a><br/></td></tr>
<tr class="separator:ga3d264db9b87c4fe29a755a02f0bad72f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:ga85d604d634dbf207503a9128fee84a50"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__bbram__server__apis.html#ga85d604d634dbf207503a9128fee84a50">XNvm_BbramWriteAesKey</a> (const u8 *Key, u16 KeyLen)</td></tr>
<tr class="memdesc:ga85d604d634dbf207503a9128fee84a50"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function does programming of key provided into BBRAM and validates CRC of the key stored in BBRAM with CRC of input key.  <a href="group__xnvm__bbram__server__apis.html#ga85d604d634dbf207503a9128fee84a50">More...</a><br/></td></tr>
<tr class="separator:ga85d604d634dbf207503a9128fee84a50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade0b7ce1639f068fb871c52eccfef0b0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__bbram__server__apis.html#gade0b7ce1639f068fb871c52eccfef0b0">XNvm_BbramWriteUsrData</a> (u32 GeneralPurposeData)</td></tr>
<tr class="memdesc:gade0b7ce1639f068fb871c52eccfef0b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes user provided 32-bit data to BBRAM.  <a href="group__xnvm__bbram__server__apis.html#gade0b7ce1639f068fb871c52eccfef0b0">More...</a><br/></td></tr>
<tr class="separator:gade0b7ce1639f068fb871c52eccfef0b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafcee46d7df5018a118844238cf4e3f65"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__bbram__server__apis.html#gafcee46d7df5018a118844238cf4e3f65">XNvm_BbramReadUsrData</a> (void)</td></tr>
<tr class="memdesc:gafcee46d7df5018a118844238cf4e3f65"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads 32-bit user data from BBRAM_8 register.  <a href="group__xnvm__bbram__server__apis.html#gafcee46d7df5018a118844238cf4e3f65">More...</a><br/></td></tr>
<tr class="separator:gafcee46d7df5018a118844238cf4e3f65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga689df607f805a008e64d9c2a181b2f17"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__bbram__server__apis.html#ga689df607f805a008e64d9c2a181b2f17">XNvm_BbramZeroize</a> (void)</td></tr>
<tr class="memdesc:ga689df607f805a008e64d9c2a181b2f17"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function zeroizes the BBRAM.  <a href="group__xnvm__bbram__server__apis.html#ga689df607f805a008e64d9c2a181b2f17">More...</a><br/></td></tr>
<tr class="separator:ga689df607f805a008e64d9c2a181b2f17"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
